/*
 * @Author: hyman
 * @Date: 2022-02-10 10:21:12
 * @LastEditors: hyman
 * @LastEditTime: 2022-02-11 11:05:10
 * @Description: 请填写简介
 */
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

//引入接口文件
import api from './api/index'

//引入cookie
import cookie from 'react-cookies'

//react没有挂载，就设置为全局变量
React.$api = api

//如果没有登录就给空对象，如果有登录就给cookie信息
React.$LoginUser = cookie.load('LoginUser') ? cookie.load('LoginUser') : {}

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
